<template>
	<view>
		<u-navbar :border-bottom="false"  title="三级联动"></u-navbar>
		<view class="content">
			<!-- 正文内容 -->
			
			<view class="item" @tap="regionVisible=true">省市区三级联动</view>
			<view class="result">选择结果：{{result.result}}</view>
			
			<w-picker
				:visible.sync="regionVisible"
				mode="region"
				:value="defaultRegion"
				default-type="value"
				:hide-area="false"
				@confirm="onConfirm($event,'region')"
				@cancel="onCancel"
				ref="region" 
			></w-picker>
			
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				regionVisible:false,
				result:{
					result:""
				},
				defaultRegion:["410000","410100","410105"]
			};
		},
		methods:{
			onConfirm(res){
				this.result=res;
				console.log(res)
			},
			onCancel(){
				
			}
		}
	}
</script>

<style lang="less" scoped>

</style>
